<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <link rel="shortcut icon" href="./favicon.svg" type="image/svg+xml"/>
        <link rel="stylesheet" href="./vender/jquery/zTreeStyle/zTreeStyle.css" type="text/css">
        <script src = "./vender/jquery/jquery.js"></script>
        <script src = "./vender/date97/WdatePicker.js"></script>
        <script src = "./vender/jquery/jquery.ztree.core.min.js"></script> 
        <script src = "./vender/jquery/jquery.ztree.exedit.min.js"></script>
        <script src = "./vender/jquery/jquery.ztree.exhide.min.js"></script>
        <script src = "./vender/codemirror.js"></script>
        <script src = "./vender/fabric.js"></script>
        <!-- 局域网环境, 请下载 editor.js替换以下路径 -->
        <script src="https://www.x-emr.cn/js/editor.js"></script> 
        <script>
          $(function() {
            //配置项可以不设置，会使用默认设置
            let option = {
                license:'gaR8jJur/A30SFnd5RHwJT4vNz7zuTe+5UVjd3EztbJyrcUa2ZMAc0WXBJZMJs5D+lpGh+a7p49pT8G1di9alwDwAzKnsz0BTNhHKUsLrU4uMy6I5iQ6l0OMB76w/VP2u1Qf8PCJQiO388mrc8dEcEZjeSVls1O3GedGINg3Od0=',
                mode:'form',  //默认模式 form:表单模式，design:设计模式
                pdfUrl:'https://www.x-emr.cn/pdf/post',  //pdf生成服务
                dictionary: [  //知识库
                    {name: '体征', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
                    {name: '症状', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
                    {name: '卫生信息数据元', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=40', itemUrl:'https://www.x-emr.cn/dictitem'},
                    {name: '电子病历数据集', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=50', itemUrl:'https://www.x-emr.cn/dictitem'},
                    {name: '国家医保标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=80', itemUrl:'https://www.x-emr.cn/dictitem'},
                    {name: '省数据平台标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=90', itemUrl:'https://www.x-emr.cn/dictitem'},
                ]
            }

            //从模块的Editor组件中获取mode，doc，lang属性 (该段代码可删除)
            let mode = window.frameElement.getAttribute('mode')
            let doc = window.frameElement.getAttribute('doc')
            let lang = window.frameElement.getAttribute('lang')
            mode? option.mode = mode: null
            lang? option.lang = lang: null

            //初始化编辑器（初始化代码可以放入组件的load事件中）
            editor.init(option).then(()=>{
                doc? editor.loadUrl(doc) : null
            })
            
          })
      </script>
    </head>
    <body></body>
</html>
